/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package xlsBeans;

import com.smartxls.WorkBook;

/**
 *
 * @author Lucas
 */
public class EventElementsXLS {
    private String samplingprotocol;
    private String samplingeffort;
    private String habitat;
    private String verbatimeventdate;
    private String eventtime;
    private String eventdate;
    private String fieldnumber;
    private String fieldnotes;
    private String eventremarks;

    private int sp;

    public EventElementsXLS() {
        this.samplingprotocol = "";
        this.samplingeffort = "";
        this.habitat = "";
        this.verbatimeventdate = "";
        this.eventtime = "";
        this.eventdate = "";
        this.fieldnumber = "";
        this.fieldnotes = "";
        this.eventremarks = "";
    }

    public EventElementsXLS(WorkBook w, int l, int sp) {
        try{
            setEventElements(w, l, sp);
        }catch(Exception e){
            e.printStackTrace();
        }
    }

    public void setEventElements(WorkBook w, int l, int sp) throws Exception {
        this.samplingprotocol = w.getText(l, 60 + sp);
        this.samplingeffort = w.getText(l, 61 + sp);
        this.habitat = w.getText(l, 62 + sp);
        this.verbatimeventdate = w.getText(l, 63 + sp);
        this.eventtime = w.getFormattedText(l, 64 + sp);
        this.eventdate = w.getFormattedText(l, 65 + sp);
        this.fieldnumber = w.getText(l, 66 + sp);
        this.fieldnotes = w.getText(l, 67 + sp);
        this.eventremarks = w.getText(l, 68 + sp);
    }

    public boolean isSetEvent(){
        if(this.samplingprotocol.equals("") && this.samplingeffort.equals("") && this.habitat.equals("") && this.verbatimeventdate.equals("") && this.eventtime.equals("") && this.eventdate.equals("") && this.fieldnumber.equals("") && this.fieldnotes.equals("") && this.eventremarks.equals(""))
            return  false;
        else return true;
    }

    public String getEventdate() {
        return eventdate;
    }

    public void setEventdate(String eventdate) {
        this.eventdate = eventdate;
    }

    public String getEventremarks() {
        return eventremarks;
    }

    public void setEventremarks(String eventremarks) {
        this.eventremarks = eventremarks;
    }

    public String getEventtime() {
        return eventtime;
    }

    public void setEventtime(String eventtime) {
        this.eventtime = eventtime;
    }

    public String getFieldnotes() {
        return fieldnotes;
    }

    public void setFieldnotes(String fieldnotes) {
        this.fieldnotes = fieldnotes;
    }

    public String getFieldnumber() {
        return fieldnumber;
    }

    public void setFieldnumber(String fieldnumber) {
        this.fieldnumber = fieldnumber;
    }

    public String getHabitat() {
        return habitat;
    }

    public void setHabitat(String habitat) {
        this.habitat = habitat;
    }

    public String getSamplingeffort() {
        return samplingeffort;
    }

    public void setSamplingeffort(String samplingeffort) {
        this.samplingeffort = samplingeffort;
    }

    public String getSamplingprotocol() {
        return samplingprotocol;
    }

    public void setSamplingprotocol(String samplingprotocol) {
        this.samplingprotocol = samplingprotocol;
    }

    public int getSp() {
        return sp;
    }

    public void setSp(int sp) {
        this.sp = sp;
    }

    public String getVerbatimeventdate() {
        return verbatimeventdate;
    }

    public void setVerbatimeventdate(String verbatimeventdate) {
        this.verbatimeventdate = verbatimeventdate;
    }



}